package com.ivo.activiti.hr.entity;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

/**
 * 员工
 * @author wj
 * @version 1.0
 */
@Data
@Entity
@Table(name = "HR_O_Employee")
@JsonIgnoreProperties(value = {"department"})
public class Employee implements Serializable {

    /**
     * 工号
     */
    @Id
    @Column(name = "Employee_ID")
    private String employee_ID;

    /**
     * 姓名
     */
    @Column(name = "EmployeeName")
    private String employeeName;

    /**
     * 英文名
     */
    @Column(name = "EmployeeName_EN")
    private String employeeName_EN;

    /**
     * 所属部门
     */
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "Department_FK")
    private Department department;

    /**
     * 职务
     */
    @Column(name = "JobTitle_FK")
    private String jobTitle;

    /**
     * 职等
     */
    @Column(name = "EmpGrade_FK")
    private String empGrade;

    /**
     * 员工组别组别
     */
    @Column(name = "EmpGroup_FK")
    private String empGroup;

    /**
     * 范围
     */
    @Column(name = "EmpSubScope_FK")
    private String empSubScope;

    /**
     * 出生日期
     */
    @Column(name = "dateOfBirth")
    private Date dateOfBirth;

    /**
     * 直接、间接
     */
    @Column(name = "ProductionGroup_FK")
    private String productionGroup;

    /**
     * 入职日期
     */
    @Column(name = "DateOfRegister")
    private Date dateOfRegister;

    /**
     * 转正日期
     */
    @Column(name = "DateOfRegular")
    private Date dateOfRegular;

    /**
     * 离职日期
     */
    @Column(name = "DateOfResign")
    private Date dateOfResign;

    /**
     * 邮箱
     */
    @Column(name = "EmailAddress")
    private String emailAddress;

    /**
     * 性别
     */
    @Column(name = "Gender_FK")
    private String gender;

    @Column(name = "VisibleFlag")
    private int visibleFlag;

    /**
     * 逻辑删除标识
     */
    @Column(name = "validFlag")
    private boolean validFlag = true;
}
